package com.fcscs.ecms.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.fcscs.core.dao.Dao;
import com.fcscs.cservice.domain.Advertisement;

@Repository
public interface ECMSAdvertiseDao extends Dao{

	/**
	 * @param id
	 * @return
	 */
	Advertisement getAdvertisement(long id);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param isCurrent
	 * @return
	 */
	List<Advertisement> getAdvertisementList(long orgId, long propId, boolean isCurrent); //isCurrent true: current; false: scheduled

	/**
	 * @param orgId
	 * @param propId
	 * @param versionId
	 * @return
	 */
	List<Advertisement> getAdvertisementList(long orgId, long propId, long versionId); //get specified version data

	/**
	 * @param adList
	 * @return
	 */
	List<Advertisement> saveAdvertisementList(List<Advertisement> adList); //used to save display order

	/**
	 * @param ad
	 * @return
	 */
	Advertisement createAdvertisement(Advertisement ad);

	/**
	 * @param ad
	 * @return
	 */
	Advertisement saveAdvertisement(Advertisement ad);
	
	/**
	 * @param ad
	 * @return
	 */
	boolean deleteAdvertisement(Advertisement ad);

	/**
	 * @param ad
	 * @return
	 */
	boolean permDeleteAdvertisement(Advertisement ad);

	/**
	 * @param orgId
	 * @param propId
	 * @return
	 */
	List<com.fcscs.cservice.domain.model.Advertisement> getAdvertisementViewList(long orgId, long propId);
	//used by web service, get current version
}
